#include "../../Header/Device/IDevice.h"

IDevice* IDevice::m_Instance = NULL;

void IDevice::SetInstance(IDevice* instance)
{
	if (!instance)
		return;
	DestroyInstance();
	m_Instance = static_cast<IDevice*>(instance);
}

IDevice* IDevice::GetInstance()
{
	return m_Instance;
}

void IDevice::DestroyInstance()
{
	if (m_Instance)
		SAFE_DEL(m_Instance);
}